|
|
|
|
|
|
|
Figure 21.2
A new project showing a UserDocument object for the
ActiveX Document application. |
|
|
|
|
|
|
|
|
Notice that the UserDocument looks a lot like a form without any border. In fact, the UserDocument looks exactly like the UserControl object that you used to create the ActiveX custom control earlier in this book. This UserDocument is where you will create the user interface for the application. After you have created the project, change the default value of the Name property for the project and the UserDocument to something a little more descriptive. |
|
|
|
|
|
|
|
|
When you save this project, you will notice that the naming of the files is slightly different than for a standard project. The source code for ActiveX documents is saved much the same way a form is saved. The description of the UserDocument object and any included controls are stored along with the code of the document in a file with the extension .DOB. This is similar to the forms .FRM file. If there are any graphical components of the interface, these are stored in a .DOX file, instead of an .FRX file. When you compile your ActiveX document, you will be creating either an .EXE or .DLL file along with a .VBD file. The .VBD file is the one that is accessed by the Internet Explorer and is considered the document part of the file. |
|
|
|
|
|
|
|
|
Creating the Document Interface |
|
|
|
|
|
|
|
|
The ActiveX document interface is created by drawing the required controls on the UserDocument object the same way you would for a standard form. Almost any Visual Basic control can be used in the creation of the document. The only exception is that you |
|
|
|
|
|